package com.ruoyi.project.user.appUser.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.user.appUser.mapper.AppUserMapper;
import com.ruoyi.project.user.appUser.domain.AppUser;
import com.ruoyi.project.user.appUser.service.IAppUserService;
import com.ruoyi.common.support.Convert;

/**
 * app用户 服务层实现
 * 
 * @author ruoyi
 * @date 2018-08-31
 */
@Service
public class AppUserServiceImpl implements IAppUserService 
{
	@Autowired
	private AppUserMapper appUserMapper;

	/**
     * 查询app用户信息
     *
     * @param appUserId app用户ID
     * @return app用户信息
     */
    @Override
	public AppUser selectAppUserById(String appUserId)
	{
	    return appUserMapper.selectAppUserById(appUserId);
	}
	
	/**
     * 查询app用户列表
     * 
     * @param appUser app用户信息
     * @return app用户集合
     */
	@Override
	public List<AppUser> selectAppUserList(AppUser appUser)
	{
	    return appUserMapper.selectAppUserList(appUser);
	}
	
    /**
     * 新增app用户
     * 
     * @param appUser app用户信息
     * @return 结果
     */
	@Override
	public int insertAppUser(AppUser appUser)
	{
	    return appUserMapper.insertAppUser(appUser);
	}
	
	/**
     * 修改app用户
     * 
     * @param appUser app用户信息
     * @return 结果
     */
	@Override
	public int updateAppUser(AppUser appUser)
	{
	    return appUserMapper.updateAppUser(appUser);
	}

	/**
     * 删除app用户对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAppUserByIds(String ids)
	{
		return appUserMapper.deleteAppUserByIds(Convert.toStrArray(ids));
	}

	/**
	 * 根据用户手机号查询用户信息
	 * @param userPhone 用户手机号
	 * @return
	 */
	@Override
	public AppUser selectAppUserByUserPhone(String userPhone)
	{
		return appUserMapper.selectAppUserByUserPhone(userPhone);
	}

}
